package domain;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "friend_request")
public class FriendRequest extends PersistentEntity {
	@OneToOne(fetch=FetchType.EAGER)
	private User requester;
	@OneToOne(fetch=FetchType.EAGER)
	private User requested;
	
	//hibernate
	public FriendRequest() {
	}
	
	//hibernate
	public FriendRequest(User requester, User requested) {
		this.requester = requester;
		this.requested = requested;
	}
	
	public void setRequester(User requester) {
		this.requester = requester;
	}
	public User getRequester() {
		return requester;
	}
	public void setRequested(User requested) {
		this.requested = requested;
	}
	public User getRequested() {
		return requested;
	}

}
